/*************************************************************************
    > File Name: query_page_size.c
    > Author:		
    > Mail:		
    > Created Time: 2021年03月22日 星期一 11时59分34秒
 ************************************************************************/

#include <stdio.h>
#include <unistd.h>

int main(int argc, char *argv[])
{

	long vp_size, pp_pages, av_pp_pages;

	vp_size = sysconf(_SC_PAGE_SIZE);
	pp_pages = sysconf(_SC_PHYS_PAGES);
	av_pp_pages = sysconf(_SC_AVPHYS_PAGES);

	printf("Virtual  page size:       0x%lxK\n", (vp_size / 1024));
	printf("Physical pages    :       0x%ldK\n", (pp_pages / 1000));
	printf("Availbale Physcial pages: 0x%ldK\n", (av_pp_pages / 1000));
	return 0;
}
